<?php

// +----------------------------------------------------------------------
// | EasyAdmin
// +----------------------------------------------------------------------
// | PHP交流群: 763822524
// +----------------------------------------------------------------------
// | 开源协议  https://mit-license.org
// +----------------------------------------------------------------------
// | github开源项目：https://github.com/zhongshaofa/EasyAdmin
// +----------------------------------------------------------------------

namespace addons\command\model;

use app\common\model\TimeModel;

class Development extends TimeModel
{
    protected $name       = "system_command";
    protected $deleteTime = false;
    protected $type       = [
        'createtime' => 'timestamp',
    ];

    public function getTypeAttr($value)
    {
        switch ($value) {
            case 'crud':
                return 'CRUD';
                break;
            case 'menu':
                return '菜单';
                break;
            case 'interface':
                return '接口';
                break;
            default:
                return '';
                break;
        }
    }

    public function getStatusAttr($value)
    {
        switch ($value) {
            case 'failured':
                return '失败';
                break;
            case 'successed':
                return '成功';
                break;
                break;
            default:
                return '';
                break;
        }
    }
}
